from django import template

register = template.Library()


def percentage(value):
    if value!=int(value):
        # value=format(value, '')
        return format(value, ".0%")
    return int(value)

register.filter("percentage",percentage)

